<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <title>移动医生站 - 病历书写</title>


  <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link href="css/bootstrap3-glyphicons.css" rel="stylesheet"/>
  <link href="css/sb-admin-2.min.css" rel="stylesheet"/>
  <link href="css/my-form-style.css" rel="stylesheet"/>
  <link href="vendor/toast/toast.css" rel="stylesheet">
  <link href="vendor/modal/modal.css" rel="stylesheet">
  <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link href="EMREditor/ueditor/themes/default/css/ueditor.css" rel="stylesheet">

  <script type="text/javascript" charset="utf-8" src="vendor/jquery/jquery.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js"></script>
  <script type="text/javascript" charset="utf-8" src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="https://cdn.staticfile.org/prettify/188.0.0/prettify.min.js"></script> <!--bs4库-->
  <style>
    label {
      font-weight: 500;
      text-align: right;
    }
    .a {
      display: flex;
    }
    .copyrights {
      text-indent: -9999px;
      height: 0;
      line-height: 0;
      font-size: 0;
      overflow: hidden;
    }
    .touming {
      background-color: rgba(0, 0, 0, 0);
    }
  </style>
</head>

<body id="page-top">
  <div id="wrapper">
    <!-- 左侧菜单栏 -->
    <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
      <a class="sidebar-brand d-flex align-items-center justify-content-center" href="#">
        <div class="sidebar-brand-icon rotate-n-15">
          <i class="fas fa-cross"></i>
        </div>
        <div class="sidebar-brand-text mx-3">住院医生站<sup>1.0</sup></div>
      </a>
      <hr class="sidebar-divider my-0">
      <li class="nav-item">
        <a class="nav-link " href="p_ruyuandengji.html">
          <i class="fas fa-fw  fa-clinic-medical"></i>
          <span>入院登記</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="p_bingrenliebiao.html">
          <i class="fas fa-fw fa-address-book"></i>
          <span>病人列表</span>
        </a>
      </li>
      <hr class="sidebar-divider">
      <li class="nav-item">
        <a class="nav-link " href="p_zhenduanchuli.html">
          <i class="fas fa-fw fa-bible"></i>
          <span>诊断处理</span>
        </a>
      </li>
      <li class="nav-item">
        <a class="nav-link " href="p_luruyizhu.html">
          <i class="fas fa-fw fa-bible"></i>
          <span>处方处置</span>
        </a>
      </li>
      <li class="nav-item active" >
        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities"
          aria-expanded="false" >
          <i class="fas fa-fw fa-wrench"></i>
          <span>病历书写</span>
        </a>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list1" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>住院病案首页</span>
          </a>
          <div id="list1" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 1" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(1)">新增病历</a>
            </div>
          </div>
        </li>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list2" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>入院记录</span>
          </a>
          <div id="list2" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 2" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(2)">新增病历</a>
            </div>
          </div>
        </li>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list3" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>病程记录</span>
          </a>
          <div id="list3" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 3" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(3)">新增病历</a>
            </div>
          </div>
        </li>    
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list4" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>知情同意书</span>
          </a>
          <div id="list4" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 4" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(4)">新增病历</a>
            </div>
          </div>
        </li>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list5" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>医嘱单</span>
          </a>
          <div id="list5" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 5" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(5)">新增病历</a>
            </div>
          </div>
        </li>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list6" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>处方</span>
          </a>
          <div id="list6" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 6" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)" >{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(6)">新增病历</a>
            </div>
          </div>
        </li>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list7" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>护理文书</span>
          </a>
          <div id="list7" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 7" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(7)">新增病历</a>
            </div>
          </div>
        </li>
        <li class="nav-item collapsed collapse" id="collapseUtilities">
          <a class="nav-link collapsed" data-toggle="collapse" data-target="#list8" aria-expanded="false">
            <i class="fas fa-fw "></i><i class="fas fa-fw "></i>
            <span>检验报告单</span>
          </a>
          <div id="list8" class="collapse" >
            <div class="bg-white py-2 collapse-inner rounded">
              <a class="collapse-item" style="text-align: center;"  v-if="item.recordInfoType == 8" v-for="(item) in bingliitems" v-bind="showContent(item.recordInfoID)">{{item.recordName}}</a> 
              <a class="collapse-item" style="text-align: center;" onclick="insertRecord(8)">新增病历</a>
            </div>
          </div>
        </li>
      <li class="nav-item">
        <a class="nav-link" href="p_yijibaogao.html">
          <i class="fas fa-fw fa-file-medical"></i>
          <span>医技报告</span></a>
      </li>
      <hr class="sidebar-divider">
      <li class="nav-item">
        <a class="nav-link" href="p_emrtemplate.html">
          <i class="fas fa-fw fa-file-medical"></i>
          <span>病历模板</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="p_quanxianguanli.html">
          <i class="fas fa-fw fa-file-medical"></i>
          <span>权限管理</span></a>
      </li>
      <hr class="sidebar-divider">
      <!-- Sidebar Toggler (Sidebar) -->
      <div class="text-center d-none d-md-inline">
        <button class="rounded-circle border-0" id="sidebarToggle"></button>
      </div>
    </ul>
    <!-- 左侧菜单栏  -->





    <!-- 右侧内容 -->
    <div id="content-wrapper" class="d-flex flex-column">
      <div id="content" class="gradient-scooter">
        <!-- 顶端栏 -->
        <nav id="patient" class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow"
          style="background-image: linear-gradient(180deg, #ffffff 80%, #e0e0e0 100%);">

          <!-- 隐藏左侧导航栏按钮 -->
          <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
            <i class="fa fa-bars"></i>
          </button>
          <ul class="navbar-nav ml-auto">
            <li class="nav-item dropdown no-arrow mx-1">
              <div>姓名：{{patient.patientName}}</div>
            </li>
            <div class="topbar-divider d-none d-sm-block"></div>
            <li class="nav-item dropdown no-arrow mx-1">
              <div>性别：{{patient.sex}}</div>
            </li>
            <div class="topbar-divider d-none d-sm-block"></div>
            <li class="nav-item dropdown no-arrow mx-1">
              <div>年龄：{{patient.age}}</div>
            </li>
            <div class="topbar-divider d-none d-sm-block"></div>
            <li class="nav-item dropdown no-arrow mx-1">
              <div>出生年月：{{patient.birthday}}</div>
            </li>
            <div class="topbar-divider d-none d-sm-block"></div>
            <li class="nav-item dropdown no-arrow mx-1">
              <div>病人号：{{patient.patientID}}</div>
            </li>
          </ul>
          <!-- 右上角个人信息 -->
          <ul class="navbar-nav ml-auto">

            <!-- Nav Item - Alerts -->
            <li class="nav-item dropdown no-arrow mx-1">
              <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown"
                aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-bell fa-fw"></i>
                <!-- Counter - Alerts -->
                <span class="badge badge-danger badge-counter">3+</span>
              </a>
              <!-- Dropdown - Alerts -->
              <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
                aria-labelledby="alertsDropdown">
                <h6 class="dropdown-header">
                  医疗消息
                </h6>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-primary">
                      <i class="fas fa-file-alt text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">2019-12月-12号</div>
                    <span class="font-weight-bold">患者id20014已上传病历</span>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-success">
                      <i class="fas fa-donate text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">2019-12月-12号</div>
                    <span class="font-weight-bold">患者id20014已上传病历</span>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-warning">
                      <i class="fas fa-exclamation-triangle text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">2019-12月-12号</div>
                    <span class="font-weight-bold">患者id20014已上传病历</span>
                  </div>
                </a>
                <a class="dropdown-item text-center small text-gray-500" href="#">显示所有消息</a>
              </div>
            </li>

            <!-- Nav Item - Messages -->
            <li class="nav-item dropdown no-arrow mx-1">
              <a class="nav-link dropdown-toggle" href="#" id="messagesDropdown" role="button" data-toggle="dropdown"
                aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-envelope fa-fw"></i>
                <!-- Counter - Messages --> 
                <span class="badge badge-danger badge-counter">7</span>
              </a>
              <!-- Dropdown - Messages -->
              <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
                aria-labelledby="messagesDropdown">
                <h6 class="dropdown-header">
                  聊天面板
                </h6>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/AU4VPcFN4LE/60x60" alt="">
                    <div class="status-indicator"></div>
                  </div>
                  <div>
                    <div class="text-truncate">I have the photos that you ordered last month, how would you like them
                      sent to you?</div>
                    <div class="small text-gray-500">梁主任</div>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/CS2uCrpNzJY/60x60" alt="">
                    <div class="status-indicator bg-warning"></div>
                  </div>
                  <div>
                    <div class="text-truncate">Last month's report looks great, I am very happy with the progress so
                      far, keep up the good work!</div>
                    <div class="small text-gray-500">梁护士</div>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/Mv9hjnEUHR4/60x60" alt="">
                    <div class="status-indicator bg-success"></div>
                  </div>
                  <div>
                    <div class="text-truncate">Am I a good boy? The reason I ask is because someone told me that people
                      say this to all dogs, even if they aren't good...</div>
                    <div class="small text-gray-500">梁庸医</div>
                  </div>
                </a>
                <a class="dropdown-item text-center small text-gray-500" href="#">获取更多信息</a>
              </div>
            </li>

            <div class="topbar-divider d-none d-sm-block"></div>

            <!-- Nav Item - User Information -->
            <li class="nav-item dropdown no-arrow">
              <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
                aria-haspopup="true" aria-expanded="false">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">Valerie Luna</span>
                <img class="img-profile rounded-circle" src="https://source.unsplash.com/QAB-WJcbgJk/60x60">
              </a>
              <!-- Dropdown - User Information -->
              <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                <a class="dropdown-item" href="#">
                  <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                  Profile
                </a>
                <a class="dropdown-item" href="#">
                  <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                  Settings
                </a>
                <a class="dropdown-item" href="#">
                  <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                  Activity Log
                </a>
                <div class="dropdown-divider"></div>\
                <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                  <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                  Logout
                </a>
              </div>
            </li>

          </ul>
          <!-- 右上角个人信息 -->
        </nav>
        <!-- 顶端栏 -->

        <!-- 页面内容 -->
        <div class="container-fluid row">
          <div class="col-12 col-md-12 col-lg-12 col-xl-12 ">
            <div class="card touming" style="border: 0px;box-shadow: 0px 0px 0px 0px;color: black;">
              <div class="card-body">
                <!-- <iframe src="EMREditor/index.html" frameBorder="0" width="800" scrolling="no" height="1000"></iframe> -->
                <div style="width:94%;height:1000px;margin:0 auto; background-color: white; box-shadow: 0 0 0 1px #d1d1d1, 0 0 3px 1px #ccc;"
                  id='EMREDITOR'></div>
              </div>
            </div>
          </div>
        </div>
        <!-- 页面内容 -->
      </div>

      <!-- 底端栏 -->
      <footer class="sticky-footer bg-white">
        <div class="container my-auto">
          <div class="copyright text-center my-auto">
            <span>Copyright &copy; 热爱生活的梁添蜀黍</span>
          </div>
        </div>

      </footer>
      <!-- 底端栏 -->
    </div>
    <!-- 右侧内容 -->

  </div>
  <!--浮空元素 拉到顶端按钮-->
  <a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
  </a>

  <!--浮空元素-->
  <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">确定退出登录?</h5>
          <button class="close" type="button" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">点击“登出”结束您的会话</div>
        <div class="modal-footer">
          <button class="btn btn-secondary" type="button" data-dismiss="modal">取消</button>
          <a class="btn btn-primary" href="login.html">登出</a>
        </div>
      </div>
    </div>
  </div>


  


  <div class="modal fade" id="myModal" style="width: 100vw;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
    <div class="modal-dialog" >
        <div class="modal-content" style="width: 100%;">
            <div class="modal-header">
                <button type="button" class="mymodal-close-button" data-dismiss="modal" aria-hidden="true">X</button>
                <h4 class="modal-title" id="myModalLabel">选择模板</h4>
            </div>
            <div class="modal-body row">
              <div class="col-sm-4">
                <div id="treeview5" ></div>
              </div>
              <div class="col-sm-8">
                <ul id="列表" style="overflow-y: scroll; height:393px;">
                  <li class="list-group-item" style="color:undefined;background-color:undefined;">
                    住院病案首页
                  </li>
                </ul>
              </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary">确定</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
  </div>




  <!-- 引入JS-->
  <script type="text/javascript" charset="utf-8" src="EMREditor/js/modernizr/2.8.3/modernizr.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="EMREditor/sde.config.js"></script>
  <script type="text/javascript" charset="utf-8" src="EMREditor/ueditor/ueditor.all.min.js?_=1528990315106"></script>
  <script type="text/javascript" charset="utf-8" src="EMREditor/ueditor/lang/zh-cn/zh-cn.js?_=1528990315106"></script>
  <script type="text/javascript" charset="utf-8" src="EMREditor/MyEditor.js"></script>
  <script type="text/javascript" charset="utf-8" src="EMREditor/js/sde-ie8-design.js?ba2b4d4610f330f6e1ad"></script>
  <script type="text/javascript" charset="utf-8" src="vendor/jquery-easing/jquery.easing.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/sb-admin-2.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="vendor/treeview/bootstrap-treeview.js"></script>
  <script type="text/javascript" charset="utf-8" src="vendor/toast/toast.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/p_common.js"></script>
  <script>
    //全局变量
    var gobalPatientID = $.query.get("patientiID");
    var gobalInHospitalInfoID = $.query.get("inHospitalInfoID");
    var gobalRecordInfoID = -1;
    var gobalRecordInfoType = -1;


    //*********************上侧病人详细信息 *************************//
    var vmpatient= new Vue({
      el: '#patient',
      data: {
        patient: {}
      },
      methods: {
        change: function (datajson) {
          this.patient = datajson;
        }
      },
      mounted: function () {

      }
    });
     //*********************上侧病人详细信息 *************************//
  
    //左侧病历列表
    var vmbinglishuxielist= new Vue({
      el: '#accordionSidebar',
      data: {
        bingliitems: []
      },
      methods: {
        addbingli: function (datajson) {
          this.bingliitems.push(datajson);
        },
        change: function (datajsonarray) {
          this.bingliitems = datajsonarray;
        },
        showContent:function(recordInfoID)
        {
          gobalRecordInfoID = recordInfoID;
            //展示病历内容
            myget('/record',{recordInfoID:gobalRecordInfoID},function(response)
            {
                if(response["code"]=1)
                {
                  //编辑器设置内容
                }
                else
                {
                  mytoast('info',"没有病历信息");
                }
            })
        }
      },
      mounted: function () {

      }
    });

    (function(){
      var defaultData = [
          {
            text: '住院病案首页',
            href: '#parent1',
            tags: 1
          },
          {
            text: '入院记录',
            href: '#parent2',
            tags: 2
          },
          {
            text: '病程记录',
            href: '#parent3',
            tags: 3
          },
          {
            text: '知情同意书',
            href: '#parent4',
            tags: 4
          },
          {
            text: '医嘱单',
            href: '#parent5'  ,
            tags: 5
          },
          {
            text: '处方',
            href: '#parent6'  ,
            tags: 6
          },
          {
            text: '护理文书',
            href: '#parent7'  ,
            tags: 7
          },
          {
            text: '检验报告单',
            href: '#parent8'  ,
            tags: 8
          }
        ];
        $('#treeview5').treeview({
          color: "#ffffff",
          backColor:"#428bca",
          onhoverColor: "orange",
          // expandIcon: 'glyphicon glyphicon-plus',
          // collapseIcon: 'glyphicon glyphicon-eur',
          // nodeIcon: 'glyphicon glyphicon-backward',
          data: defaultData,
            onNodeSelected: function(event, node) {
              $('#selectable-output').prepend('<p>' + node.text + ' was selected</p>');
            },
            onNodeUnselected: function (event, node) {
              console.log(node.tags);
            }
        });
    //     $("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
    //     $("body").toggleClass("sidebar-toggled");
    //     $(".sidebar").toggleClass("toggled");
    //     if ($(".sidebar").hasClass("toggled")) {
    //     $('.sidebar .collapse').collapse('hide');
    // };});

      //查询病人信息和
      myget('/patientinfo',{patientID:gobalPatientID},function(response)
      {
          if(response["code"]==1)
          {
            vmpatient.change(response["data"]);
          }
          else
          {
            mytoast('info',response["msg"]);
          }
      })

      //病历信息
      myget('/record',{patientID:gobalPatientID},function(response)
      {
          if(response["code"]==1)
          {
            vmbinglishuxielist.change(response["data"]);
          }
          else
          {
            mytoast('info',response["msg"]);
          }
      })
    })();


    //新增病历弹出模态框
    function insertRecord(type)
    {
      $('#myModal').modal('show');
    }



    function savemyxml()
    {
      if(gobalRecordInfoID = -1)
      {
        mypost("",{
          "patientID":gobalPatientID,"recordName":"","recordInfoType":gobalRecordInfoType,"createUserID":"","content":""
        },function(myresponse){
          mytoast("info",myresponse["msg"]);
        });
      }
      else 
      {
        myput("",{
          "recordInfoID":gobalRecordInfoID,"recordName":"","lastUserID":"","content":""
        },function(myresponse){
          mytoast("info",myresponse["msg"]);
        });
      } 
    }

    function getControlSource(){

    }



    window.onload = function(){
      
    $(".modal-dialog").css("max-width","1000px");
    $(".modal-dialog").css("width","600px");
    createEMREditor();
    }


    //保存阿牛
    //新增病历框，有模板可选
    //控件资源
  </script>
</body>

</html>